package com.mit.web.vo.purchase
{
	import com.mit.web.vo.BaseVO;
	
	import mx.collections.ArrayCollection;
	[Bindable]
	[RemoteClass(alias="com.mit.common.purchase.dto.MaterialDTO")]	
	public class MaterialVO  extends BaseVO
	{
		public var name:String;
		public var code:String;
		public var unit:String;
		public var type:String;
		public var colors:ArrayCollection;
		public var categoryId:int;
		public var category:String;
		public var spec:String;
		public var supplierId:int;
		public var activeInd:String;
		public var countOfColors:int;
		
		public function MaterialVO()
		{
			colors = new ArrayCollection();
		}
		
		public function addColor(color:ColorStyleVO):void{
			colors.addItem(color);
		}
		
		public function get displayName():String{
			return (code == null)?name:(code + " " + name);
		}

	}
}